<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>提取宝贝视频</title>
	<link rel="stylesheet" type="text/css" href="__PRIVATE__/css/style.css">
	<script type="text/javascript" src="__PRIVATE__/js/jquery-1.8.3.min.js"></script>
</head>
<body>
<div class="downloadBox1">新生儿视频提取验证</div>
<div class="downloadBox">
	<div>视频码：<input type="text" id="orderid" placeholder="请输入视频码"></div>
	<div>提取码：<input type="text" id="takeno" placeholder="请输入提取码"></div>
	<div><input type="button" class="confirm" value="确 认"></div>
	<div id="downloadA"></div>
</div>

</body>
</html>
<script>
	$('.confirm').click(function() {
		if ( $("#orderid").val()=='' ||  $("#takeno").val()=='' ) {
			alert('请填写视频码或提取码');
			return false;
		}
		var savePostData = {
			orderid:$("#orderid").val(),
			takeno :$("#takeno").val()
		}
		$.post("{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/takeVideo')}",savePostData,function(data){
			if (data.status) {
				var aurl = "宝贝视频 <a href='"+data.url+"'>点击下载</a>";
				$('#downloadA').html(aurl);
			}else{
				var aurl = "<span style='color:red;'>提取失败，请输入正确视频码或提取码!</span>";
				$('#downloadA').html(aurl);
			}
		});
	});
</script>
